package com.example.springdocdemo.vo;

import io.swagger.v3.oas.annotations.media.Schema;

import java.math.BigDecimal;

/**
 * 定义用户信息
 */
@Schema(name = "User", description = "用户实体")
public class User {
  //@Schema(description = "用户ID", example = "1", requiredMode = Schema.RequiredMode.REQUIRED)
  private Long id;

  //@Schema(description = "用户名", example = "john_doe", requiredMode = Schema.RequiredMode.REQUIRED)
  private String username;

  //@Schema(description = "电子邮件", example = "john.doe@example.com", requiredMode = Schema.RequiredMode.REQUIRED)
  private String email;

  //@Schema(description = "余额", example = "200", requiredMode = Schema.RequiredMode.REQUIRED)
  private BigDecimal balance;

  public User(Long id, String username, String email, BigDecimal balance) {
    this.id = id;
    this.username = username;
    this.email = email;
    this.balance=balance;
  }

  public BigDecimal getBalance() {
    return balance;
  }

  public void setBalance(BigDecimal balance) {
    this.balance = balance;
  }

  public String getEmail() {
    return email;
  }

  public void setEmail(String email) {
    this.email = email;
  }

  public String getUsername() {
    return username;
  }

  public void setUsername(String username) {
    this.username = username;
  }

  public Long getId() {
    return id;
  }

  public void setId(Long id) {
    this.id = id;
  }
}